package com.myThreadPool;


import java.lang.reflect.Executable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @Author weijingchen
 * @Date 2025/6/23 20:05
 * @Version 1.0.0
 */
public class MyThreadPool {
    public static void main(String[] args) throws InterruptedException {
        ExecutorService executorService = Executors.newCachedThreadPool();
        executorService.submit(new MyRunnable());
        Thread.sleep(1000);
        executorService.submit(new MyRunnable());
        Thread.sleep(1000);
        executorService.submit(new MyRunnable());
        Thread.sleep(1000);
        executorService.submit(new MyRunnable());
        Thread.sleep(1000);
        executorService.submit(new MyRunnable());
        Thread.sleep(1000);
    }
}
